INSERT INTO `engine4_core_modules` (`name`, `title`, `description`, `version`, `enabled`, `type`) VALUES
('facebookse', 'Facebook for SocialEngine', 'Facebook for SocialEngine', '4.1.0', 1, 'extra');

INSERT IGNORE INTO `engine4_core_menuitems` (`name`, `module`, `label`, `plugin`, `params`, `menu`, `submenu`, `order`) VALUES
('facebooksepage_friend_home', 'facebookse', 'My Facebook', 'Facebookse_Plugin_Menus', '{"route":"facebookse_index_settings"}', 'user_home', '', 999),
('core_admin_main_plugins_facebookse', 'facebookse', 'FacebookSE', '', '{"route":"admin_default","module":"facebookse","controller":"settings"}', 'core_admin_main_plugins','', 999);

CREATE TABLE IF NOT EXISTS `engine4_facebookse_metainfos` (
  `metainfo_id` int(10) unsigned NOT NULL auto_increment,
  `entity` varchar(100) NOT NULL,
  `enable` tinyint(2) NOT NULL default "1",
  `title` varchar(250) NOT NULL,
  `photo_id` int(10) NOT NULL,
  `description` text NOT NULL,
  `types` text NOT NULL,
  `fbadmin_appid` tinyint(2) NOT NULL default "1",
  PRIMARY KEY  (`metainfo_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;

CREATE TABLE IF NOT EXISTS `engine4_facebookse_widgetsettings` (
  `widgetsetting_id` int(10) unsigned NOT NULL auto_increment,
  `widget_type` varchar(20) NOT NULL,
  `fbpageurl` varchar(255) NOT NULL,
  `fb_width` int(10) unsigned NOT NULL,
  `fb_height` int(10) unsigned NOT NULL,
  `show_header` tinyint(1) unsigned NOT NULL default "1",
  `widget_color_scheme` varchar(20) NOT NULL default "light",
  `widget_font` varchar(20) NOT NULL default "",
  `widget_border_color` varchar(20) NOT NULL default "",
  `recommend` tinyint(1) unsigned NOT NULL default "1",
  `connection` int(10) unsigned NOT NULL default "10",
  `show_stream` tinyint(1) unsigned NOT NULL default "1",
  PRIMARY KEY  (`widgetsetting_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

INSERT IGNORE INTO `engine4_facebookse_widgetsettings` (`widgetsetting_id`, `widget_type`, `fbpageurl`, `fb_width`, `fb_height`, `show_header`, `widget_color_scheme`, `widget_font`, `widget_border_color`, `recommend`, `connection`, `show_stream`) VALUES
(1, "activity_feed", "", "190", "250", "1", "light", "", "#aaaaaa", "1", "10", "1"),
(2, "facepile", "", "190", "250", "1", "light", "", "", "1", "1", "1"),
(3, "likebox", "", "190", "250", "1", "light", "", "", "1", "10", "1"),
(4, "recommendation", "", "190", "250", "1", "light", "", "#aaaaaa", "1", "10", "1");

CREATE TABLE IF NOT EXISTS `engine4_facebookse_feedsettings` (
  `feedsetting_id` int(11) unsigned NOT NULL auto_increment,
  `user_id` int(11) unsigned NOT NULL,
  `blog_post` tinyint(3) unsigned NOT NULL default "2",
  `group_post` tinyint(3) unsigned NOT NULL default "2",
  `classified_post` tinyint(3) unsigned NOT NULL default "2",
  `poll_post` tinyint(3) unsigned NOT NULL default "2",
  `list_post` tinyint(3) unsigned NOT NULL default "2",
  `event_post` tinyint(3) unsigned NOT NULL default "2",
  `music_post` tinyint(3) unsigned NOT NULL default "2",
  `video_post` tinyint(3) unsigned NOT NULL default "2",
  `album_post` tinyint(3) unsigned NOT NULL default "2",
  `document_post` tinyint(3) unsigned NOT NULL default "2",
  `forumtopic_create_post` tinyint(3) unsigned NOT NULL default "2",
  `forumtopic_reply_post` tinyint(3) unsigned NOT NULL default "2",
  `profile_update` tinyint(3) unsigned NOT NULL default "2",
  `signup` tinyint(3) unsigned NOT NULL default "2",
  PRIMARY KEY  (`feedsetting_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;

CREATE TABLE IF NOT EXISTS `engine4_facebookse_likes` (
  `like_id` int(10) unsigned NOT NULL auto_increment,
  `content_type` varchar(100) NOT NULL,
  `enable` tinyint(1) unsigned NOT NULL default "1",
  `like_type` varchar(20) NOT NULL default "like",
  `like_faces` tinyint(1) unsigned NOT NULL default "0",
  `like_font` varchar(20) NOT NULL,
  `like_color` varchar(11) NOT NULL,
  `layout_style` varchar(20) NOT NULL default "standard",
  PRIMARY KEY  (`like_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ;

INSERT INTO `engine4_facebookse_likes` (`content_type`, `enable`, `like_type`, `like_faces`, `like_font`, `like_color`, `layout_style`) VALUES
("user_profile", 1, "like", 1, "", "light", "standard"),
("album", 1, "like", 1, "", "light", "standard"),
("blog", 1, "like", 1, "", "light", "standard"),
("classified", 1, "like", 1, "", "light", "standard"),
("list", 1, "like", 1, "", "light", "standard"),
("event", 1, "like", 1, "", "light", "standard"),
("group", 1, "like", 1, "", "light", "standard"),
("forum", 1, "like", 1, "", "light", "standard"),
("music", 1, "like", 1, "", "light", "standard"),
("poll", 1, "like", 1, "", "light", "standard"),
("video", 1, "like", 1, "", "light", "standard"),
("document", 1, "like", 1, "", "light", "standard"),
("site_homepage", 1, "like", 1, "", "light", "standard");

CREATE TABLE IF NOT EXISTS `engine4_facebookse_statistics` (
  `statistic_id` int(11) unsigned NOT NULL auto_increment,
  `url` text NOT NULL,
  `updated` timestamp NOT NULL default "0000-00-00 00:00:00" on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`statistic_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

INSERT IGNORE INTO `engine4_core_settings` (`name`, `value`) VALUES 
('facebookse.fbappid', ''),
('facebookse.home.textarea', ''),
('facebookse.home.title', ''),
('facebookse.is.exe', '1'),
('facebookse.likeboxtype', '1'),
('facebookse.lsettings', 'XXXXXX-XXXXXX-XXXXXX'),
('facebookse.lsettings.fbadmin.userid', '1'),
('facebookse.lsettings.overwrite.headmeta.active', '1'),
('facebookse.lsettings.submit', ''),
('facebookse.navi.auth', '1'),
('facebookse.page.type', '1'),
('facebookse.recomendation.type', '1'),
('fb.site.likeint', '1'),
('fbadmin.userid', '');
